<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<%@ page import="com.scalar.chiptrack.commons.Constants" %>

<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/chiptrack-tags.tld" prefix="chiptrack" %>
<%@ taglib uri="/WEB-INF/struts-nested.tld" prefix="nested" %>

<chiptrack:checkLogon sourcePage="/scrapMaterial.do"/>
<%String chipTracContext = "/" + ConfigManager.getChipTracContext();
    String userTypeChiptrac = Constants.USER_TYPE_CHIPTRAC + "";
    /*try {*/
%>

<HTML><HEAD><TITLE>Scalarsoft - ChipTrac</TITLE>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<LINK href="<%=chipTracContext%>/jsp/includes/stylesheets/scalarsoft.css" type="text/css" rel="stylesheet">
<script src="<%=chipTracContext%>/jsp/includes/scripts/functions.js"></script>
<script src="<%=chipTracContext%>/jsp/includes/scripts/validations.js"></script>
<script src="<%=chipTracContext%>/jsp/includes/scripts/quickSearch.js"></script>
<META content="MSHTML 5.50.4807.2300" name=GENERATOR></HEAD>
<BODY bgColor=#ffffff leftMargin=0 topMargin=0 marginheight="0" marginwidth="0">

<script language="javascript">
window.onload = init;
var listSize = 0;
function init()
{
    if ( document.scrapMaterialform.processStepId  != null)
    {
        qs_1 = new QuickSearch( document.scrapMaterialform.processStepId, document.scrapMaterialform.qs1, false);
    }
    if ( document.scrapMaterialform.lotId  != null)
    {
        qs_2 = new QuickSearch( document.scrapMaterialform.lotId, document.scrapMaterialform.qs2, false);
    }
}

function selectProcessType()
{
    var form = document.scrapMaterialform;

    if( form.processType.value == 0 )
    {
        form.action.value = 'processTypes';
        form.submit();
        return;
    }
    if ( form.processStepId != null )
    {
        form.processStepId.value = 0;
    }
    if ( form.locationId != null )
    {
        form.locationId.value = 0;
    }
    if ( form.lotId != null )
    {
        form.lotId.value = 0;
    }    
    form.action.value="lotDetails";
    form.submit();
 }

function reset()
{
    document.scrapMaterialform.reset();
    qs_1.resetQuickSearchCntrl();
    qs_2.resetQuickSearchCntrl();
}

function searchLots()
{
    var form = document.scrapMaterialform;

    form.action.value="lotDetails";
    form.submit();
}

function searchLotsOnSubmit()
{
     var form = document.scrapMaterialform;

    form.action.value="lotDetails";
    form.submit();
}
function processSelected(form)
{
    var pa=document.getElementById("message");
    var x = form.processType;

    for(var i=0; i< x.length; i++)
    {
        if(x.options[i].selected)
        {
	        if(x.options[i].value == "0")
            {
	            pa.innerHTML = "<li>Select Process Type</li>";
                x.focus();
	            return false;
            }
        }
    }
    return true;
}

function save()
{
    var pa=document.getElementById("message");

    pa.innerHTML                = '';
    var form                    = document.scrapMaterialform;
    var count1                  = 0;

    for( var i=0; i < listSize; i++ )
    {
        if( form['wipLotsList['+i+'].checked'].checked == true )
        {
            if ( form.nonValueInventory.checked == false )
            {
                 if (form.baseprocessType.value.toUpperCase() != 'Fab'.toUpperCase() && form.baseprocessType.value.toUpperCase() != 'Wafer Store'.toUpperCase()
                    && form.baseprocessType.value.toUpperCase() != 'Sort'.toUpperCase() && form.baseprocessType.value.toUpperCase() != 'Bumping'.toUpperCase()   )
               {
                    if( form['wipLotsList['+i+'].scrapDieQty'].value == '' || !isInteger( form['wipLotsList['+i+'].scrapDieQty'].value ) )
                    {
                        pa.innerHTML = "<li> Please enter valid Die Quantity";
                        form['wipLotsList['+i+'].scrapDieQty'].focus();
                        return;
                    }
                    else if( parseInt( form['wipLotsList['+i+'].scrapDieQty'].value ) == 0 )
                    {
                        pa.innerHTML = "<li> Zero Qty was not allowed";

                        if ( form.processType.value != 'Die Bank')
                        {
                            form['wipLotsList['+i+'].scrapDieQty'].focus();
                        }
                        return;
                    }
                    else if ( parseInt( form['wipLotsList['+i+'].scrapDieQty'].value ) > parseInt(form['wipLotsList['+i+'].dieQtyIn'].value)  )
                    {
                        pa.innerHTML = "<li> Scrap Qty should not be greater than Qty In";
                        if ( form.processType.value != 'Die Bank')
                        {
                            form['wipLotsList['+i+'].scrapDieQty'].focus();
                        }
                        return;
                    }
               }
               else
               {
                   if( form['wipLotsList['+i+'].shipQty'].value == '' || !isInteger( form['wipLotsList['+i+'].shipQty'].value ) )
                    {
                        pa.innerHTML = "<li> Please select valid wafers";
                        return;
                    }
                    else if( parseInt( form['wipLotsList['+i+'].shipQty'].value ) == 0 )
                    {
                        pa.innerHTML = "<li> Zero Qty was not allowed";
                        return;
                    }
                    form['wipLotsList['+i+'].shipQty'].disabled = false;
               }
            }
            else
            {
                if( form['wipLotsList['+i+'].dieQtyIn'].value == '' || !isInteger( form['wipLotsList['+i+'].dieQtyIn'].value ) )
                {
                    pa.innerHTML = "<li> Please enter valid Die Quantity In";
                    form['wipLotsList['+i+'].dieQtyIn'].focus();
                    return;
                }
                else if( parseInt( form['wipLotsList['+i+'].dieQtyIn'].value ) == 0 )
                {
                    pa.innerHTML = "<li> Zero Qty was not allowed";

                    if ( form.processType.value != 'Die Bank')
                    {
                        form['wipLotsList['+i+'].dieQtyIn'].focus();
                    }
                    return;
                }
                else if ( parseInt( form['wipLotsList['+i+'].dieQtyIn'].value ) > parseInt(form['wipLotsList['+i+'].scrapDieQty'].value)  )
                {
                    pa.innerHTML = "<li> Die Qty should not be greater than Scrap Qty In";
                    if ( form.processType.value != 'Die Bank')
                    {
                        form['wipLotsList['+i+'].dieQtyIn'].focus();
                    }
                    return;
                }
            }
            count1++;

        }
    }

    if( count1==0 )
	{
		pa.innerHTML = "<li> Please select atleast one lot";
		return;
	}
    form.qs2.disabled = false;
    form.lotId.disabled = false;
    form.action.value = "save";
    form.submit();
}

function enableDieQtyOutField( index )
{
    var pa=document.getElementById("message");

    pa.innerHTML                = '';
    var form                    = document.scrapMaterialform;

    if(form['wipLotsList['+index+'].checked'].checked == true )
    {           
        if (form.baseprocessType.value.toUpperCase() != 'Fab'.toUpperCase() && form.baseprocessType.value.toUpperCase() != 'Wafer Store'.toUpperCase()
            && form.baseprocessType.value.toUpperCase() != 'Sort'.toUpperCase() && form.baseprocessType.value.toUpperCase() != 'Die Bank'.toUpperCase()
            && form.baseprocessType.value.toUpperCase() != 'Bumping'.toUpperCase()   )
        {

           if ( form.nonValueInventory.checked == false )
           {
              form['wipLotsList['+index+'].scrapDieQty'].readOnly = false;
           }
           /*else
           {
               form['wipLotsList['+index+'].dieQtyIn'].readOnly = false;
           }*/
        }
    }
    else
    {
        if ( form.nonValueInventory.checked == false )
        {
            if (form.baseprocessType.value.toUpperCase() != 'Fab'.toUpperCase() && form.baseprocessType.value.toUpperCase() != 'Wafer Store'.toUpperCase()
            && form.baseprocessType.value.toUpperCase() != 'Sort'.toUpperCase() && form.baseprocessType.value.toUpperCase() != 'Bumping'.toUpperCase()   )
            {
                form['wipLotsList['+index+'].scrapDieQty'].value = form['wipLotsList['+index+'].dieQtyIn'].value;
                form['wipLotsList['+index+'].scrapDieQty'].readOnly = true;
            }
        }
        else
        {
            form['wipLotsList['+index+'].dieQtyIn'].value = form['wipLotsList['+index+'].scrapDieQty'].value;
            form['wipLotsList['+index+'].dieQtyIn'].readOnly = true;
        }
    }
}

function disableLotNumber()
{
    var form = document.scrapMaterialform;

    if ( form.nonValueInventory.checked )
    {
        form.qs2.disabled = true;
        form.lotId.disabled = true;
    }
    else
    {
        form.qs2.disabled = false;
        form.lotId.disabled = false;
    }
}
function getLotWaferInfo( rowIndex )
{
    var pa=document.getElementById("message");
    pa.innerHTML                = '';
    var form                    = document.scrapMaterialform;
    var nonValueFlag = form.nonValueInventory.checked;
    newWindow = window.open('<%=chipTracContext%>/jsp/operations/scrap_material_wafer_info.jsp?rowIndex=' + rowIndex+ '&nonValueFlag='+nonValueFlag,'scrapWaferPopup','channelmode=no,directories=no,toolbar=no,menubar=no,personalbar=no,status=no,scrollbars=yes,width=600,height=375,resizable=yes');
    newWindow.focus();
}

function waferDataEntry( rowIndex )
{
    var pa=document.getElementById("message");
	pa.innerHTML = '';
    var form = document.scrapMaterialform;
    var waferQtyInCtrl = form['wipLotsList['+rowIndex+'].waferQtyIn'];

    newWindow = window.open('<%=chipTracContext%>/jsp/operations/inv_out_trans_wafer_entry.jsp?waferQty='+waferQtyInCtrl.value + '&rowIndex=' + rowIndex , 'OutTransactionWaferPopup','channelmode=no,directories=no,toolbar=no,menubar=no,personalbar=no,status=no,scrollbars=yes,width=600,height=375,resizable=yes');
    newWindow.focus();
}
function checkLength(element, size)
{
    if(	element.value.length >= size )
	{
		event.returnValue = false;
	}
}
</script>
<!-- Top Header Start-->
<%--<%@ include file="/jsp/includes/header.jsp" %>--%>
<logic:equal value="<%=userTypeChiptrac%>" name="user" property="userType" scope="session">
        <%@ include file="/jsp/includes/header.jsp" %>
    </logic:equal>
    <logic:notEqual value="<%=userTypeChiptrac%>" name="user" property="userType" scope="session">
        <%@ include file="/jsp/includes/extHeader.jsp" %>
    </logic:notEqual>
<!-- Top Header End-->
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
  <TBODY>
  <TR>
	<td width='180' valign='top' background='<%=chipTracContext%>/jsp/includes/images/left_red_bg.gif'>
<!-- Side Navigation start -->
<%--<%@ include file="/jsp/operations/dataentryMenu.jsp" %>--%>
    <logic:equal value="<%=userTypeChiptrac%>" name="user" property="userType" scope="session">
        <%@ include file="/jsp/operations/dataentryMenu.jsp" %>
    </logic:equal>
    <logic:notEqual value="<%=userTypeChiptrac%>" name="user" property="userType" scope="session">
        <%@ include file="/jsp/operations/ext_user_dataentryMenu.jsp" %>
    </logic:notEqual>
<!-- end of the side navigations -->
<TD bgcolor="#ffffff">
<IMG height=9 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=8></TD>
<TD bgcolor="#ffffff"><IMG height=480 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=2></TD>
<TD valign="top" width="100%">
<IMG height=1 src="<%=chipTracContext%>/jsp/includes/images/clear.gif" width=500 border=0>
<BR>
<html:form name="scrapMaterialform" method = "POST" onsubmit="javascript:searchLotsOnSubmit();" type="com.scalar.chiptrack.operations.dataentry.lotscrap.forms.ScrapMaterialForm" action="/scrapMaterial">
<input type="hidden" name="action" value="<%= (String)request.getAttribute("action")%>">
<TABLE border="0" width="100%" align=center>
<TR><TD colspan=5 class="NArialW" align="center">Scrap Material</TD><TD width="25%" class="NArialL">&nbsp;</TD></TR>
<TR><TD colspan=6>&nbsp;</TD></TR>
<TR><TD colspan=6 class='NArialL'><strong><FONT id="message" styleClass="NArialL" color='FF0000'></FONT></strong></TD></TR>
<TR>
   <TD colspan=5>
  <chiptrack:info  styleClass="NArialL" />
  <chiptrack:errors styleClass="NArialL" />
  <chiptrack:messages type="info" styleClass="NArialL" />
</TD><TD width="25%" class="NArialL">&nbsp;</TD></TR>
<logic:equal name="showMessage" value="TRUE">
    <tr><td colspan=6 align='left'><font class='NArialS'color='blue'><b><%=Constants.NO_MODIFY_RIGHTS %></b></font></TD></TR>
</logic:equal>
<TR><TD>
<TABLE  border="0" width="100%" cellpadding="1" cellspacing="1">
    <TR>
        <logic:present name="processTypes" scope="request">
            <TD width="10%" class="NArialL">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
            <TD width="20%" nowrap class="NArialL">Process Type:<font color= "red">*</font></TD>
            <TD width="20%" class="NArialL">
            <html:select property="processType" name="scrapMaterialform" styleClass="txfield" onchange="selectProcessType()" >
            <html:option value="0">Select Process Type</html:option>
            <html:options collection="processTypes" property="value" labelProperty="label"/>
            </html:select>
             <html:hidden property="baseprocessType" name="scrapMaterialform"/>
            </TD>
        </logic:present>
        <logic:notPresent name="processTypes" scope="request">
            <TD width="10%" class="NArialL">&nbsp;</TD>
            <TD width="20%" class="NArialL">&nbsp;</TD>
            <TD width="25%" class="NArialL">&nbsp;</TD>
        </logic:notPresent>

      <TD width="15%" class="NArialL">&nbsp;</TD>
      <TD width="15%" class="NArialL">&nbsp;</TD>
      <TD width="20%" class="NArialL">&nbsp;</TD>

    </TR>
     <TR>
        <TD colspan="6"><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=20></TD>
    </TR>
    <logic:present name="partNumbersList" >
    <TR>
        <TD width="10%" class="NArialL">&nbsp;</TD>
        <TD class="NArialL" width='20%'>Quick Search:</TD>
        <td class="NArialL" width='20%'>
        <input type="text" name="qs1" class="txfield" size='23' onkeyup='quickSearch(qs_1)'/>
        </td>
        <TD COLSPAN=3>&nbsp;</TD>
    </TR>
    </logic:present>
    <TR>
        <logic:present name="partNumbersList" >
            <TD width="10%" class="NArialL">&nbsp;</TD>
            <TD width="20%" class="NArialL">Product Name: </TD>
            <TD width="20%" class="NArialL">
                <html:select property="processStepId"  name="scrapMaterialform" styleClass="txfield">
                <html:option value="0">Select Part Number</html:option>
                <html:options collection="partNumbersList" property="value" labelProperty="label"/>
                </html:select>
            </TD>
        </logic:present>
        <logic:notPresent name="partNumbersList" scope="request">
            <TD width="10%" class="NArialL">&nbsp;</TD>
            <TD width="20%" class="NArialL">&nbsp;</TD>
            <TD width="20%" class="NArialL">&nbsp;</TD>
        </logic:notPresent>

        <logic:present name="locationList" scope="request">
            <TD width="15%" align="center" class="NArialL">&nbsp;&nbsp;Location: </TD>
            <TD width="15%" class="NArialL">
                <html:select property="locationId" name="scrapMaterialform" styleClass="txfield">
                    <html:options collection="locationList" property="value" labelProperty="label"/>
                </html:select>
            </TD>
            <TD width="20%" class="NArialL">&nbsp;</TD>
        </logic:present>
        <logic:notPresent name="locationList" scope="request">
            <TD width="15%" class="NArialL">&nbsp;</TD>
            <TD width="15%" class="NArialL">&nbsp;</TD>
            <TD width="20%" class="NArialL">&nbsp;</TD>
       </logic:notPresent>
   </TR>
    <TR>
        <TD colspan="6"><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=20></TD>
    </TR>

    <logic:present name="lotsList" scope="request">
    <TR>
        <TD width="10%" class="NArialL">&nbsp;</TD>
        <TD class="NArialL" width='20%'>Quick Search:</TD>
        <td class="NArialL" width='20%'>
        <input type="text" name="qs2" class="txfield" size='23' onkeyup='quickSearch(qs_2)'/>
        </td>
        <TD COLSPAN=2>&nbsp;</TD>
    </TR>
    </logic:present>
    <TR>
        <logic:present name="lotsList" scope="request">
            <TD width="10%" class="NArialL">&nbsp;</TD>
            <TD width="20%" class="NArialL">Lot Number:</TD>
            <TD width="20%" class="NArialL">
                <html:select property="lotId" name="scrapMaterialform" styleClass="txfield">
                <html:option value="0">Select Lot Number</html:option>
                <html:options collection="lotsList" property="lotId" labelProperty="lotNumber"/>
                </html:select>
            </TD>&nbsp;&nbsp;&nbsp;&nbsp;
        </logic:present>
        <logic:notPresent name="lotsList" scope="request">
            <TD width="10%" class="NArialL">&nbsp;</TD>
            <TD width="20%" class="NArialL">&nbsp;</TD>
            <TD width="20%" class="NArialL">&nbsp;</TD>
        </logic:notPresent>
        <logic:present name="lotsList" scope="request">
        <TD align="center" nowrap width="15%" class="NArialL">&nbsp;&nbsp;&nbsp;
            <html:checkbox property="nonValueInventory" name="scrapMaterialform" styleClass="txfield" onclick="disableLotNumber()"/></TD>
        <TD width="15%" class="NArialL" nowrap>&nbsp;Non-Value Inventory</TD>
        <TD width="20%" class="NArialL">&nbsp;</TD>
         </logic:present>
        <%--<html:hidden property="nonValueInventory" name="scrapMaterialform"/>--%>
        <logic:notPresent name="lotsList" scope="request">
            <TD width="15%" class="NArialL">&nbsp;</TD>
            <TD width="15%" class="NArialL">&nbsp;</TD>
            <TD width="20%" class="NArialL">&nbsp;</TD>
        </logic:notPresent>
   </TR>

    <TR>
        <TD colspan="6"><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=20></TD>
    </TR>
  <logic:present name="partNumbersList">
   <TR>
        <td colspan="6" align="center">
            <a href="javascript:searchLots()"><img border="0" src="<%=chipTracContext%>/jsp/includes/images/search.gif" width="53" height="17" onmouseover="window.status='Click to Search for all Lots';return true" onmouseout="window.status='';return true"title="Click to Search for all Lots"/></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <a href="javascript:reset();"><img border="0" src="<%=chipTracContext%>/jsp/includes/images/reset.gif" width="53" height="17" onmouseover="window.status='Click to Reset';return true" onmouseout="window.status='';return true" title="Click here to Reset"></a>
        </td>
    </TR>
    </logic:present>
    </TABLE>
   </TD>
 </TR>
</TABLE>

<nested:present property="wipLotsList">
     <nested:size id="LotsSize" property="wipLotsList"/>
     <logic:greaterThan name="LotsSize" value="0">
     <!--<TR>
        <TD colspan="6" >-->
            <table width="100%" align="left" cellpadding="2" cellspacing="2" border="0">

                <tr>
                <logic:notEqual value="true" property="nonValueInventory" name="scrapMaterialform">
                <td colspan="10"class='NArialL'><font class='NArialS'><font color='blue'>[Click on Select checkbox to Scrap the Lots]</font></font></td>
                 </logic:notEqual>
                 <logic:equal value="true" property="nonValueInventory" name="scrapMaterialform">
                  <td colspan="10"class='NArialL'><font class='NArialS'><font color='blue'>[Click on Select checkbox to Move nonValue Wip to SCRAP]</font></font></td>
                  </logic:equal>
            </tr>
            <tr bgcolor="#993333" align = "center">
                <td class='NArialL'><font color="#FFFFFF">Select </font></td>
                <td class='NArialL' nowrap><font color="#FFFFFF">Part Number</font></td>
                <td class='NArialL' nowrap><font color="#FFFFFF">Lot No#</font></td>
                <td class='NArialL'><font color="#FFFFFF">FabLot No#</font></td>
                <td class='NArialL'><font color="#FFFFFF">Vendor</font></td>
                <logic:notEqual value="true" property="nonValueInventory" name="scrapMaterialform">
                    <td class='NArialL'><font color="#FFFFFF">Qty In</font></td>
                    <td class='NArialL'><font color="#FFFFFF">Scrap Qty</font></td>
                    <td class='NArialL'><font color="#FFFFFF">Wafer Ids</font></td>
                    <td class='NArialL'><font color="#FFFFFF">isHold</font></td>
                    <td class='NArialL'><font color="#FFFFFF">isNonValue<br>Inventory</font></td>
                </logic:notEqual>
                <logic:equal value="true" property="nonValueInventory" name="scrapMaterialform">
                    <td class='NArialL'><font color="#FFFFFF">Scrap Qty</font></td>
                    <td class='NArialL'><font color="#FFFFFF">Qty In</font></td>
                </logic:equal>
                <td class='NArialL'><font color="#FFFFFF">Comments</font></td>
           </tr>
            <nested:size id="listSize" property="wipLotsList"/>
            <nested:iterate id="wipInfo" property="wipLotsList" indexId="iterateIdx" type = "com.scalar.chiptrack.operations.dataentry.LotDetails">
             <% String click = "enableDieQtyOutField('" + iterateIdx.intValue() + "')"; %>
            <%--<nested:equal value="false" property="assyReleased">--%>
            <tr bgcolor='<%=iterateIdx.intValue() % 2 == 0 ? "#FFFFEE" : "#DEE1E2"%>'>
                <td align="center" class='NArialL'><nested:checkbox  name="wipInfo" property = "checked" styleClass="txfield" onclick="<%= click %>"/></td>
                <td class='NArialL'><nested:write name="wipInfo" property ="partNumber"/></td>
                <td class='NArialL'><nested:write name="wipInfo" property ="lotNumber"/></td>
                <td class='NArialL'><nested:write name="wipInfo" property ="fabLotNumber"/></td>
                <td class='NArialL'><nested:write name="wipInfo" property ="vendorName"/></td>

                <logic:notEqual value="true" property="nonValueInventory" name="scrapMaterialform">
                    <logic:equal name="showWaferIds" value="TRUE">
                        <logic:equal value="Die Bank" name="scrapMaterialform" property="processType">
                            <td class='NArialL'><nested:write name="wipInfo" property ="dieQtyIn"/></td>
                            <td nowrap class='NArialL'>
                                <input type="text" name="wipLotsList[<%=iterateIdx.intValue()%>].scrapDieQty" size ="12" value="<nested:write  name="wipInfo" property ="dieQtyIn"/>" readonly="true" onkeypress="javascript:allowInteger()" class="valuetxfield"/>
                                <a href="javascript:getLotWaferInfo('<%= iterateIdx.intValue() %>')" ><IMG border="0" src="<%=chipTracContext%>/jsp/includes/images/uparrow.gif" width="20" height="16"></a>
                                <nested:hidden property="binQtyAsString"/>
                                <%--<nested:hidden property="checkedBinQtyAsString"/>--%>
                                <%--<nested:hidden property="checkedWaferIdsAsString"/>--%>
                                <nested:hidden property="waferChecked"/>
                                <nested:hidden property="scrapQtyAsString"/>
                                <nested:hidden property="checkedScrapQtyAsString"/>
                            </td>
                        </logic:equal>
                        <logic:notEqual value="Die Bank" property="baseprocessType" name="scrapMaterialform">
                            <td class='NArialL'nowrap><nested:write name="wipInfo" property ="waferQtyIn"/><nested:hidden property="waferQtyIn"/></td>
                            <td class='NArialL' nowrap>
                                <nested:text name="wipInfo" property ="shipQty" styleClass="valuetxfield" size="4" disabled="true"/>
                                <a href="javascript:waferDataEntry('<%= iterateIdx.intValue() %>')" onmouseover="window.status='Click here to view the Wafer Id Info';return true" onmouseout="window.status='';return true" title="<nested:write name="wipInfo" property ="processType"/>"><IMG border="0" src="<%=chipTracContext%>/jsp/includes/images/uparrow.gif" width="20" height="16"></a>
                                <nested:hidden name="wipInfo" property ="remainQty"/>
                            </td>
                        </logic:notEqual>
                        <td class='NArialL'><nested:write name="wipInfo" property ="waferIds"/><nested:hidden property="waferIds"/></td>
                        <nested:hidden property="checkedWaferIdsAsString"/>
                        <nested:hidden property="waferIdValueAsString"/>
                    </logic:equal>

                    <logic:notEqual name="showWaferIds" value="TRUE">
                        <td class='NArialL'><nested:write name="wipInfo" property ="dieQtyIn"/></td>
                        <td nowrap class='NArialL'>
                        <input type="text" name="wipLotsList[<%=iterateIdx.intValue()%>].scrapDieQty" size ="12" value="<nested:write  name="wipInfo" property ="dieQtyIn"/>" readonly="true" onkeypress="javascript:allowInteger()" class="valuetxfield"/>
                        </td>
                    </logic:notEqual>

                    <td align="center" class='NArialL'><nested:checkbox  name="wipInfo" styleClass="txfield" property="lotHold" disabled="true"/></td>
                    <td align="center" class='NArialL'><nested:checkbox  name="wipInfo" styleClass="txfield" property="nonValueInventory"/></td>
                    <nested:hidden property="dieQtyIn"/>
                </logic:notEqual>

                <logic:equal value="true" property="nonValueInventory" name="scrapMaterialform">
                    <td class='NArialL'><nested:write name="wipInfo" property ="scrapDieQty"/></td>
                    <td nowrap class='NArialL'>
                        <input type="text" name="wipLotsList[<%=iterateIdx.intValue()%>].dieQtyIn" size ="12" value="<nested:write  name="wipInfo" property ="scrapDieQty"/>" readonly="true" onkeypress="javascript:allowInteger()" class="valuetxfield"/>
                        <logic:equal value="Die Bank" name="scrapMaterialform" property="processType">
                        <a href="javascript:getLotWaferInfo('<%= iterateIdx.intValue() %>')" ><IMG border="0" src="<%=chipTracContext%>/jsp/includes/images/uparrow.gif" width="20" height="16"></a>
                        <nested:hidden property="waferIds"/>
                        <nested:hidden property="binQtyAsString"/>
                        <nested:hidden property="checkedBinQtyAsString"/>
                        <nested:hidden property="checkedWaferIdsAsString"/>
                        <nested:hidden property="waferChecked"/>
                        <nested:hidden property="scrapQtyAsString"/>
                        <nested:hidden property="checkedScrapQtyAsString"/>
                        </logic:equal>
                    </td>
                    <nested:hidden property="scrapDieQty"/>
                </logic:equal>
                <nested:hidden property="processStepId"/>
                <nested:hidden property="locationId"/>
                <nested:hidden property="lotId"/>
                <nested:hidden property="dateIn"/>
                <td><font class='NArialL'>
                   <nested:textarea name="wipInfo" property="scrapComments" onkeypress="javascript:checkLength(this, 1000)" styleClass="txfield" rows="2" cols="20"/>
               </font>
               </td>
            </tr>
             <%--</nested:equal>--%>
             </nested:iterate>
              <script type="text/javascript">
               listSize = <%=listSize.intValue()%>;
              </script>  
            <%--<tr bgcolor='#DEE1E2'>
                <td colspan="8" class='NArialL'><input type="checkbox" name="select_bottom" onClick = "javascript:setSelectAllIds(this)">&nbsp;&nbsp Select All</td>
            </tr>--%>
             <TR>
                <TD COLSPAN="10"><IMG SRC="<%=chipTracContext%>/jsp/includes/images/spacer.gif" HEIGHT=20></TD>
            </TR>
            <tr>
               <td align = "center" colspan ="10">
                    <a href="javascript:save()" onmouseover="window.status='Click here to Save the Scraped Lots';return true" onmouseout="window.status='';return true" title="Click here to Save the Scraped Lots"><img border="0" src="<%=chipTracContext%>/jsp/includes/images/save.gif" width="53" height="17"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <a href="javascript:reset()" onmouseover="window.status='Click here to Reset the Scraped Lots';return true" onmouseout="window.status='';return true" title="Click here to Reset the Scraped Lots"><img border="0" src="<%=chipTracContext%>/jsp/includes/images/reset.gif" width="53" height="17"></a>
                </td>
            </tr>
              </table>
           <%-- </TD>
       </TR>--%>

    </logic:greaterThan>
    </nested:present>

</html:form>
<BR><BR><BR></TD>
<TD bgcolor="#ffffff"><IMG height=1 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=1></TD>
</TR>
</TABLE>
<!-- Footer starts here -->
<%@ include file="/jsp/includes/footer.jsp" %>
<!-- footer end here -->
</BODY>
</HTML>

<%--
    }
    catch(Exception e)
    {
        e.printStackTrace();
    }
--%>
